/*
 * Copyright 2009 Eat Local Food, LLC
 * Copyright (c) 2007 osCommerce (this file was written after
 * code review of osCommerce).
 *
 * This file is part of gwtCommerce.
 *
 * gwtCommerce is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * gwtCommerce is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with gwtCommerce.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.elf.gwt.common.client.model;

import com.google.gwt.json.client.JSONObject;


/**
 *  
 */
public class TellAFriendModel extends AbstractModel
{
	protected int errorCode;
	protected String yourEmailAddress;
	protected String yourName;
	protected String friendsEmailAddress;
	protected String friendsName;
	protected String yourMessage;
	
	public TellAFriendModel()
	{
		errorCode = 0;
		yourEmailAddress = "";
		yourName = "";
		friendsEmailAddress = "";
		friendsName = "";
		yourMessage = "";
	}
	
	public TellAFriendModel(JSONObject jsonObject)
	{
		errorCode = convertToInteger(jsonObject,"error_code");
	}	

	public void update(TellAFriendModel model)
	{
		setErrorCode(model.getErrorCode());
	}

	public String getFriendsEmailAddress() {
		return friendsEmailAddress;
	}

	public void setFriendsEmailAddress(String friendsEmailAddress) {
		this.friendsEmailAddress = friendsEmailAddress;
	}

	public String getFriendsName() {
		return friendsName;
	}

	public void setFriendsName(String friendsName) {
		this.friendsName = friendsName;
	}

	public String getYourEmailAddress() {
		return yourEmailAddress;
	}

	public void setYourEmailAddress(String yourEmailAddress) {
		this.yourEmailAddress = yourEmailAddress;
	}

	public String getYourMessage() {
		return yourMessage;
	}

	public void setYourMessage(String yourMessage) {
		this.yourMessage = yourMessage;
	}

	public String getYourName() {
		return yourName;
	}

	public void setYourName(String yourName) {
		this.yourName = yourName;
	}

	public int getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(int errorCode) {
		this.errorCode = errorCode;
	}
}
